<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
// eslint-disable-next-line no-unused-vars
const globalData = {
  appLaunch: null,
  isFirstOpen: false, // 是否第一次打开
}
onLaunch(() => {
  console.log('App Launch')
  init()
})
onShow(() => {
  console.log('App Show')
})
onHide(() => {
  console.log('App Hide')
})

function init () {
  // console.log('init')
  // getAppInfo()
  // uni.login({
  //   success (res) {
  //     if (res.code) {
  //     //发起网络请求
  //       console.log(res)
  //     } else {
  //       console.log('登录失败！' + res.errMsg)
  //     }
  //   },
  // })
}

function getAppInfo () {
  const appInfo = uni.getAccountInfoSync().miniProgram
  console.log(appInfo)

}
</script>

<style lang="scss">
@import "tailwindcss/tailwind.css";
@import '@climblee/uv-ui/index.scss';
#app,
body,
page {
  height: 100%;
  background-color: #f8f8f9;
  font-family: "PingFang SC", "Helvetica Neue", Helvetica, "Arial Bold", sans-serif;
}

/* 底部安全区 */
.safe-area-inset-bottom {
  padding-bottom: 0;
  padding-bottom: constant(safe-area-inset-bottom); /* ios特性 兼容iOS < 11.2 */
  padding-bottom: env(safe-area-inset-bottom);  /* ios特性 兼容iOS > 11.2 */
}
</style>
